<!DOCTYPE html>
<html>
<head>
    <title>试卷</title>
		<#include "/header.html">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
    <style>
        .ui-jqgrid tr.jqgrow td {
            text-overflow : ellipsis;
            vertical-align: middle;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList==11">
        <div class="grid-btn">
			<#if shiro.hasPermission("examination:paper:save")>
            <a class="btn btn-primary" @click="add1"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("examination:paper:update")>
            <a class="btn btn-primary" @click="update1"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
            <a class="btn btn-primary" @click="resultType">&nbsp;包含结果</a>
            <a class="btn btn-primary" @click="questions">&nbsp;包含题目</a>
			<#if shiro.hasPermission("examination:paper:delete")>
            <a class="btn btn-primary" @click="del1"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="showList==12" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
					<div class="form-group">
                        <div class="col-sm-2 control-label">试卷名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examinationPaper.name" placeholder="试卷名"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">考试时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examinationPaper.time" placeholder="考试时间"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">描述</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="examinationPaper.description" placeholder="描述"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">封面图片</div>
                        <div class="col-sm-10">
                            <img id="pic"  width="80px" height="80px">
                            <!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
                            <!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
                            <a class="btn btn-primary" id="upload"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                        </div>
                    </div>

					<div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <input type="button" class="btn btn-primary" @click="saveOrUpdate1" value="确定"/>
                &nbsp;&nbsp;    <input type="button" class="btn btn-warning" @click="reload1" value="返回"/>
                    </div>
        </form>
    </div>

    <div v-show="showList==21">
        <div class="grid-btn">
            <a class="btn btn-primary" @click="add2"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a class="btn btn-primary" @click="update2"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary" @click="del2"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            <a class="btn btn-warning" @click="return21">&nbsp;返回</a>
        </div>
        <div id="jqg2">
            <table id="jqGrid2"></table>
            <div id="jqGridPager2"></div>
        </div>
    </div>

    <div v-show="showList==22" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">类型名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationResultType.typename" placeholder="类型名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">描述</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" style="height: 300px;" v-model="examinationResultType.description" placeholder="描述"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate2" value="确定"/>
                &nbsp;&nbsp;    <input type="button" class="btn btn-warning" @click="reload2" value="返回"/>
            </div>
        </form>
    </div>

    <div v-show="showList==31">
        <div class="grid-btn">
            <a class="btn btn-primary" @click="add3"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a class="btn btn-primary" @click="update3"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary" @click="del3"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            <a class="btn btn-warning" @click="return31">&nbsp;返回</a>
        </div>
        <div id="jqg3">
            <table id="jqGrid3"></table>
            <div id="jqGridPager3"></div>
        </div>
    </div>

    <div v-show="showList==32" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">问题</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationQuestions.question" placeholder="问题"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">选项1</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationQuestions.option1" placeholder="选项内容"/>
                </div>
                <div class="col-sm-2 control-label" style="margin-top: 6px;"></div>
                <div class="col-sm-10" style="margin-top: 6px;">
                    <select  class="form-control" style="margin-left: 2px; float: left; width: 60%;" v-model="examinationQuestions.option1ResultTypeId" >
                        <option  v-for="(item,index) in resultList"  :value="item.id">{{ item.typename }}</option>
                    </select>
                    <input type="text" class="form-control" style="margin-right: 33px; float: right; width: 25%" v-model="examinationQuestions.option1Score" placeholder="分值"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">选项2</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationQuestions.option2" placeholder="选项内容"/>
                </div>
                <div class="col-sm-2 control-label" style="margin-top: 6px;"></div>
                <div class="col-sm-10" style="margin-top: 6px;">
                    <select  class="form-control" style="margin-left: 2px; float: left; width: 60%;" v-model="examinationQuestions.option2ResultTypeId" >
                        <option  v-for="(item,index) in resultList"  :value="item.id">{{ item.typename }}</option>
                    </select>
                    <input type="text" class="form-control" style="margin-right: 33px; float: right; width: 25%" v-model="examinationQuestions.option2Score" placeholder="分值"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">选项3</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationQuestions.option3" placeholder="选项内容"/>
                </div>
                <div class="col-sm-2 control-label" style="margin-top: 6px;"></div>
                <div class="col-sm-10" style="margin-top: 6px;">
                    <select  class="form-control" style="margin-left: 2px; float: left; width: 60%;" v-model="examinationQuestions.option3ResultTypeId" >
                        <option  v-for="(item,index) in resultList"  :value="item.id">{{ item.typename }}</option>
                    </select>
                    <input type="text" class="form-control" style="margin-right: 33px; float: right; width: 25%" v-model="examinationQuestions.option3Score" placeholder="分值"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">选项4</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationQuestions.option4" placeholder="选项内容"/>
                </div>
                <div class="col-sm-2 control-label" style="margin-top: 6px;"></div>
                <div class="col-sm-10" style="margin-top: 6px;">
                    <select  class="form-control" style="margin-left: 2px; float: left; width: 60%;" v-model="examinationQuestions.option4ResultTypeId" >
                        <option  v-for="(item,index) in resultList"  :value="item.id">{{ item.typename }}</option>
                    </select>
                    <input type="text" class="form-control" style="margin-right: 33px; float: right; width: 25%" v-model="examinationQuestions.option4Score" placeholder="分值"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">选项5</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="examinationQuestions.option5" placeholder="选项内容"/>
                </div>
                <div class="col-sm-2 control-label" style="margin-top: 6px;"></div>
                <div class="col-sm-10" style="margin-top: 6px;">
                    <select  class="form-control" style="margin-left: 2px; float: left; width: 60%;" v-model="examinationQuestions.option5ResultTypeId" >
                        <option  v-for="(item,index) in resultList"  :value="item.id">{{ item.typename }}</option>
                    </select>
                    <input type="text" class="form-control" style="margin-right: 33px; float: right; width: 25%" v-model="examinationQuestions.option5Score" placeholder="分值"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate3" value="确定"/>
                &nbsp;&nbsp;    <input type="button" class="btn btn-warning" @click="reload3" value="返回"/>
            </div>
        </form>
    </div>

</div>

<script src="${request.contextPath}/statics/js/modules/examination/examinationpaper.js?_${.now?long}"></script>
</body>
</html>